-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some more fixes & improvements #2023
Open
sjaeckel
wants to merge
13
commits into
master
Choose a base branch
from
debug-1946-1994
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1a53f5d
to
3490100
Compare
jubalh
reviewed
Mar 7, 2025
jubalh
reviewed
Mar 7, 2025
jubalh
reviewed
Mar 7, 2025
3490100
to
c808665
Compare
This allows to kind of automate what profanity should do as first jobs, e.g. `--cmd /foo --cmd /bar --cmd /quit` so one can easily check for memory leaks. Signed-off-by: Steffen Jaeckel <[email protected]>
Instead of adding stuff to `_shutdown()`, we can now register a shutdown routine from the respective `init()` function of our modules. This also has the advantage, that we're sure they're called in reverse order from how the initialization happened. I didn't simply use `atexit()` because POSIX says that the number of possible callbacks is limited (min 32) and I was not sure whether we will maybe extend this number at one point. Signed-off-by: Steffen Jaeckel <[email protected]>
9d745d0
to
6f74a98
Compare
7de8243
to
6ea5e50
Compare
jubalh
approved these changes
Mar 10, 2025
I hope I didn't overshoot :) Signed-off-by: Steffen Jaeckel <[email protected]>
`ProfMessage` was not completely initialized, fix this by using `calloc()` for the allocation. Signed-off-by: Steffen Jaeckel <[email protected]>
* destroy/free/shutdown/close in reverse order of allocation * more static/auto_Xfree * less variables/strlen/GString * properly `\0`-terminate string of testcase Signed-off-by: Steffen Jaeckel <[email protected]>
While trying to get the unit tests working again I stumbled over all those things that I thought could be better^TM. Now we also know "TODO: why does this make the test fail?" - because the unit tests are brittle AF ... and we have to init the subsystems we use in the test, otherwise the cleanup will fail... BTW. you can now also only run a single test ... or a pattern or so ... you'd have to read how `cmocka_set_test_filter()` works exactly. Signed-off-by: Steffen Jaeckel <[email protected]>
1f0756b
to
d1aa295
Compare
d1aa295
to
ffcee26
Compare
* Also pass `$*` to `configure` when invoking `ci-build.sh`, so one can e.g. run `./ci-build.sh --without-xscreensaver` Signed-off-by: Steffen Jaeckel <[email protected]>
ffcee26
to
f004cc9
Compare
Need to take a closer look at ba50497 otherwise already LGTM |
* Less leaks * Less allocations Signed-off-by: Steffen Jaeckel <[email protected]>
Instead of always returning a `strdup()`'ed version, maybe return NULL and handle this in the calling code. This is still not true for `plugins_pre_chat_message_display()`, where we return the passed `messag` in case there are no plugins, since this would require a bigger refactor of more parts. This also * merges the implementation of `sv_ev_incoming_private_message()` and `sv_ev_delayed_private_message()`, since they differed only by a single line. * untangles the `#ifdef` mess in `cl_ev_send_muc_msg_corrected()`. Signed-off-by: Steffen Jaeckel <[email protected]>
Signed-off-by: Steffen Jaeckel <[email protected]>
Signed-off-by: Steffen Jaeckel <[email protected]>
Signed-off-by: Steffen Jaeckel <[email protected]>
* Add an internal `_notifier_uninit()` function. * Instead of `#ifdef` inside `notify()`, provide different target-specific static implementations. This also introduces `log_error_once()`. Signed-off-by: Steffen Jaeckel <[email protected]>
f004cc9
to
edb41be
Compare
True, that one grew a bit too much. I've split it up into two commits, so it's easier to review. |
jubalh
approved these changes
Mar 12, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check commit messages for details.